# https://hub.docker.com/_/openjdk
FROM centos:7.5.1804

# set label
LABEL maintainer="97662463@qq.com"

# set environment
ENV JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk" \
    TIME_ZONE="Asia/Shanghai" 

WORKDIR /$BASE_DIR

RUN set -x \
    && yum update -y \
    && yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel \
    && ln -snf /usr/share/zoneinfo/$TIME_ZONE /etc/localtime && echo '$TIME_ZONE' > /etc/timezone \
    && yum clean all

# 设置额外参数
ENV JAVA_OPTS="-Xmx256M"

CMD ["java","-version"]